home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 October: Mac OS SDK / Dev.CD Oct 96 SDK / Dev.CD Oct 96 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODFDev / Embed / Sources / Frame.h < prev    next >
Encoding:
Text File  |  1996-08-16  |  3.4 KB  |  112 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                Frame.h
  4. //    Release Version:    $ ODF 1 $
  5. //
  6. //    Author:                M.Boetcher
  7. //
  8. //    Copyright:    (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  9. //
  10. //========================================================================================
  11.  
  12. #ifndef FRAME_H
  13. #define FRAME_H
  14.  
  15. // ----- Framework Includes -----
  16.  
  17. #ifndef FWFRMING_H
  18. #include "FWFrming.h"
  19. #endif
  20.  
  21. #ifndef FWDRGDRP_H
  22. #include "FWDrgDrp.h"
  23. #endif
  24.  
  25. //========================================================================================
  26. // Forward class declaration
  27. //========================================================================================
  28.  
  29. class CEmbedPart;
  30. class CEmbedContent;
  31.  
  32. //========================================================================================
  33. // CLASS CEmbedFrame
  34. //========================================================================================
  35.  
  36. class CEmbedFrame : public FW_CEmbeddingFrame, public FW_MDraggableFrame, public FW_MDroppableFrame
  37. {
  38. //----------------------------------------------------------------------------------------
  39. //    Initialization/Destruction
  40. //
  41.   public:
  42.     FW_DECLARE_AUTO(CEmbedFrame)
  43.     
  44.     CEmbedFrame(Environment* ev, ODFrame* odFrame, FW_CPresentation* presentation, 
  45.                 CEmbedPart* part, CEmbedContent* content);
  46.     virtual ~CEmbedFrame();
  47.  
  48. //----------------------------------------------------------------------------------------
  49. //    Inherited API
  50. //
  51.   public:
  52.     virtual void                     Draw(Environment* ev, ODFacet* odFacet, ODShape* invalidShape);
  53.  
  54.     virtual void                     CreateSubViews(Environment* ev);
  55.  
  56.     virtual FW_Boolean                 DoAdjustMenus(Environment* ev, 
  57.                                             FW_CMenuBar* menuBar, 
  58.                                             FW_Boolean hasMenuFocus, 
  59.                                             FW_Boolean isRoot);
  60.  
  61.     virtual ODFacet*                CreateEmbeddedFacet(Environment* ev,
  62.                                             ODFacet* embeddingFacet,
  63.                                             FW_MProxy* proxy,
  64.                                             ODFrame* embeddedFrame,
  65.                                             ODShape* proposedClipShape);
  66.                                         
  67.     virtual void                    FrameShapeChanged(Environment* ev);
  68.  
  69.     virtual ODDragResult            CanAcceptDrop(Environment* ev, ODDragItemIterator* dragInfo);
  70.  
  71.     virtual FW_CClipboardCommand*    NewClipboardCommand(Environment* ev, 
  72.                                             ODCommandID commandID);
  73.  
  74.     virtual FW_CDragCommand*        NewDragCommand(Environment* ev, 
  75.                                             FW_CFrame* theFrame, 
  76.                                             const FW_CMouseEvent& theMouseEvent);
  77.                                             
  78.     virtual FW_CDropCommand*         NewDropCommand(Environment* ev,
  79.                                             FW_CFrame* frame,
  80.                                             ODDragItemIterator* dropInfo, 
  81.                                             ODFacet* odFacet, 
  82.                                             const FW_CPoint& dropPoint);
  83.  
  84.     virtual FW_CInsertCommand*        NewInsertCommand(Environment* ev, const FW_PFileSpecification& fileSpec);
  85.  
  86.     virtual FW_Boolean                DoMouseDownInEmbeddedFrameBorder(Environment* ev, 
  87.                                             const FW_CBorderMouseEvent& theBorderMouseEvent);
  88.                                             
  89. //----------------------------------------------------------------------------------------
  90. //    New API
  91. //
  92.   public:
  93.     ODShape*                        MakeFrameShape(Environment* ev);
  94.  
  95.     ODFacet*                        CreateOneEmbeddedFacet(Environment* ev, 
  96.                                             ODFacet* embeddingFacet, 
  97.                                             ODFrame* embeddedFrame, 
  98.                                             ODFacet* sibling,
  99.                                             const FW_CRect& clipRect);
  100.  
  101.     void                            EmbeddedFacetBounds(Environment* ev, FW_CRect* clipRects);
  102.                                         
  103. //----------------------------------------------------------------------------------------
  104. //    Data Members
  105. //
  106.   private:
  107.     CEmbedPart*            fPart;
  108.     CEmbedContent*         fContent;
  109. };
  110.  
  111. #endif
  112.